<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
  <style>
    #box {
      width: 600px;
      height: 400px;
    }
  </style>
</head>

<body>
  <div id="box"></div>
</body>

</html>
<script src="../node_modules/echarts/dist/echarts.min.js"></script>
<script>
  let charts = echarts.init(document.getElementById('box'));
  let option = {
    xAxis: {
      type: 'category'
    },
    yAxis: {},
    dataset: {
      // source: [
      //   ['qqq', '2020-4', '2020-5', '2020-6', '2020-7', '2020-8', '2020-9'],
      //   ["A", 20, 26, 29, 63, 45, 52],
      //   ["B", 210, 126, 69, 23, 40, 25],
      //   ["C", 200, 260, 209, 163, 245, 452],
      //   ['D', 120, 126, 129, 163, 145, 152]
      // ]
      // source: [
      //   ['qqq', 'A', 'B', 'C', 'D'],
      //   ['2020-4', 20, 210, 200, 120],
      //   ['2020-5', 26, 126, 260, 126],
      //   ['2020-6', 29, 69, 209, 129],
      //   ['2020-7', 63, 23, 163, 163],
      //   ['2020-8', 45, 40, 245, 145],
      //   ['2020-9', 52, 25, 452, 152]
      // ]
      dimensions: ['time', 'A', 'B', 'C', 'D'],
      source: [{
          time: '2020-4',
          A: 20,
          B: 210,
          C: 200,
          D: 120
        }, {
          time: '2020-5',
          A: 26,
          B: 126,
          C: 260,
          D: 126
        },
        {
          time: '2020-6',
          A: 29,
          B: 69,
          C: 209,
          D: 129
        },
        {
          time: '2020-7',
          A: 63,
          B: 23,
          C: 163,
          D: 163
        },
        {
          time: '2020-8',
          A: 45,
          B: 40,
          C: 245,
          D: 145
        },
        {
          time: '2020-9',
          A: 52,
          B: 25,
          C: 452,
          D: 152
        }
      ]
    },
    tooltip: {},
    series: [{
        type: 'line',
        // seriesLayoutBy: 'row'
      },
      {
        type: 'line',
        // seriesLayoutBy: 'row'
      },
      {
        type: 'line',
        // seriesLayoutBy: 'row'
      },
      {
        type: 'line',
        // seriesLayoutBy: 'row'
      }
    ]
  }
  charts.setOption(option);
</script>